package org.rainbow.shiro.session.listener;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CustomSessionListener implements SessionListener  {
	
	protected Logger logger = LoggerFactory.getLogger(CustomSessionListener.class);

	public void onStart(Session session) {
		logger.info("=============》会话创建 sessionId:{}" + session.getId());		
	}

	public void onStop(Session session) {
		logger.info("===============》会话停止 sessionId:{}" + session.getId());		
	}

	public void onExpiration(Session session) {
		//过期触发
		logger.info("===========》会话过期 sessionId:{}" + session.getId());
	}

}
